package com.chengzzz.mysite.enums;

import lombok.Getter;

/**
 * @program: myfunhome
 * @description: 状态码
 * @create: 2020-06-18 22:47
 **/


public enum StateEnum {

    /**
     *  0 管理员
     *  1 普通用户
     */
    ADMIN(0,"管理员"),
    USER(1,"普通用户"),

    /**
     * 逻辑删除
     *   0  未删除
     *   1  已删除
     */
    DELETED_FALSE(0,"未删除"),
    DELETED_TRUE(1,"已删除"),

    /**
     * asc
     * desc
     */
    ASC(-1,"asc"),
    DESC(-1,"desc"),


    ENABLE(1,"启用"),
    DISABLE(0,"禁用"),


    /**
     * 请求访问状态
     */
    REQUEST_SUCCESS(1,"请求成功"),
    REQUEST_ERROR(0,"请求异常");


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    private Integer code;
    private String msg;

    StateEnum(Integer code, String msg){
        this.code=code;
        this.msg=msg;
    }
}
